<html><head><title>AddPathArc</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">AddPathArc()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#3A3966"><b>AddPathArc</b></font>(x1.d, y1.d, x2.d, y2.d, Radius.d, [, Flags])</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Adds a straight line towards (x1, y2) followed by an arc in the direction of (x2, y2) 
to the vector drawing path. This function can be used to create paths with rounded corners. 
The new cursor position will be the endpoint of the arc. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>x1.d, y1.d</i></td>
<td width="90%"> 
The target position for the straight line. 

</td></tr>
<tr><td><i>x2.d, y2.d</i></td>
<td> 
The target position to indicate the direction of the arc. 

</td></tr>
<tr><td><i>Radius.d</i></td>
<td> 
The radius for the rounded corner. 

</td></tr>
<tr><td><i>Flags (optional)</i></td>
<td> 
Can be one of the following values: 
<pre><font face="Courier New, Courier, mono"size="2">  <font color="#924B72">#PB_Path_Default</font> : The positions are absolute (default)
  <font color="#924B72">#PB_Path_Relative</font>: The positions are relative to the last cursor position.
</font></pre>


</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>
None.


</blockquote><p><b>Remarks</b></p><blockquote>

The following image illustrates the meaning of the two reference points and the 
the segments that are added to the path. Note that no second straight line is added 
towards the (x2, y2) point by the command. This makes it possible to use 
<a href="addpatharc.html">AddPathArc()</a> again to add a further rounded corner also at the (x2, y2) position. 


<p><img src="../HelpPictures/addpatharc2.png"></p>

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 0, 0, 400, 200, &quot;VectorDrawing&quot;, <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#3A3966">    CanvasGadget</font>(0, 0, 0, 400, 200)

    <b><font color="#3A3966">If</font></b> <font color="#3A3966">StartVectorDrawing</font>(<font color="#3A3966">CanvasVectorOutput</font>(0))

<font color="#3A3966">      MovePathCursor</font>(40, 60)
<font color="#3A3966">      AddPathArc</font>(100, 140, 160, 20, 20)
<font color="#3A3966">      AddPathArc</font>(160, 20, 220, 180, 20)
<font color="#3A3966">      AddPathArc</font>(220, 180, 280, 80, 20)
<font color="#3A3966">      AddPathArc</font>(280, 80, 340, 120, 20)
<font color="#3A3966">      AddPathLine</font>(340, 120)

<font color="#3A3966">      VectorSourceColor</font>(<font color="#3A3966">RGBA</font>(255, 0, 0, 255))
<font color="#3A3966">      StrokePath</font>(10)
          
<font color="#3A3966">      StopVectorDrawing</font>()
    <b><font color="#3A3966">EndIf</font></b>
    
    <b><font color="#3A3966">Repeat</font></b>
      Event =<font color="#3A3966"> WaitWindowEvent</font>()
    <b><font color="#3A3966">Until</font></b> Event = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>

<br>
<p><img src="../HelpPictures/addpatharc.png"></p>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="movepathcursor.html">MovePathCursor()</a>, <a href="addpathline.html">AddPathLine()</a>, <a href="addpathcurve.html">AddPathCurve()</a>, 
<a href="addpathcircle.html">AddPathCircle()</a>, <a href="addpathellipse.html">AddPathEllipse()</a>, <a href="addpathbox.html">AddPathBox()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><a href="index.html">VectorDrawing Index</a> - <a href="addpathbox.html">AddPathBox()</a> -><br><br>

</body></html>